<template>
  <div>
  <header-tilte :title="title"></header-tilte>
    <div class="flex_center">
      <div class="bodyContent">
        <div class="flex_center flex_column" style="margin-top: 5rem">
          <!--<i style="font-size: 4rem;color: #5f5858" class="fa fa-check-circle-o"></i>-->
          <img src="../../assets/img/radio.png" style="width: 4rem;height: 4rem">
          <div class="successContent flex flex_column" v-if="toType == 1">
            <p>支付成功</p>
            <div style="margin-top: 1rem">
              <mu-button color="primary" @click="toOrderList">查看订单</mu-button>
            </div>
          </div>
          <div class="successContent flex flex_column" v-if="toType == 2">
            <p>购买成功</p>
            <div style="margin-top: 1rem">
              <mu-button color="primary" @click="bookingWater">下单订水</mu-button>
            </div>
          </div>
          <div class="successContent flex flex_column" v-if="toType == 5">
            <div style="margin-top: 1rem">
              <p style="font-size: 1rem" class="font-weight">恭喜您</p>
              <p style="font-size: 1rem" class="font-weight">注册成功</p>
            </div>
          </div>
        </div>
      </div>
    </div>
  </div>
</template>

<script>
    import HeaderTilte from "../../components/headerTilte";

    export default {
      data(){
        return{
          title:'支付成功',
          toType:1,//表示即将跳转到的页面
        }
      },
      mounted(){
        this.toType = this.$route.query.toType;
      },
      methods:{
        toOrderList(){
          this.$router.push({path:'/qds/orderList'})
        },
        bookingWater(){
          this.$router.push({path:'/qds/bookingWater'})
        }
      },
      components: {HeaderTilte},
      name: "success"
    }
</script>

<style scoped>

  .successContent{
    margin-top: 2rem;
  }
</style>
